# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: enzzzzy <enzzzzy ta gmail dot com>

pkgname=dhcping
pkgver=1.2
pkgrel=3
pkgdesc='Small tool to let you perform a dhcp-request to find out if a dhcp-server is still running'
url='https://www.mavetju.org/unix/general.php'
arch=('loong64' 'x86_64')
license=('BSD')
depends=('glibc')
source=(https://www.mavetju.org/download/${pkgname}-${pkgver}.tar.gz)
sha256sums=('32ef86959b0bdce4b33d4b2b216eee7148f7de7037ced81b2116210bc7d3646a')
sha512sums=('84ead27ba07f7ecc1e8cf6d95b40c98ee20a39ce54386249f403120beac70c45d765d5268b4968dbfbbb92790adcc1eb648c3a87071d215ad64bcd23aec818d3')

build() {
  cd ${pkgname}-${pkgver}
  ./configure \
    --prefix=/usr  \
    --build=${CHOST} \
    --host=${CHOST} \
    --mandir=/usr/share/man
  make
}

check() {
  cd ${pkgname}-${pkgver}
  make check
}

package () {
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" install
  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}

# vim: ts=2 sw=2 et:
